<?php
/**
 * Created by JetBrains PhpStorm.
 * User: alex
 * Date: 31.07.13
 * Time: 12:55
 * To change this template use File | Settings | File Templates.
 */
	function getProductInfo($url)
	{
		$content = file_get_contents($url);
		//
		//		$curl = curl_init();
		//		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
		//		curl_setopt($curl, CURLOPT_TIMEOUT, 6000);
		//		curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.1) Gecko/2008070208');
		//		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
		//		curl_setopt($curl, CURLOPT_REFERER, 'http://google.ua/');
		//		curl_setopt($curl, CURLOPT_PROXY, "192.168.2.227");
		//		curl_setopt($curl, CURLOPT_URL, $url);
		//
		//		$content = curl_exec($curl);
		//		curl_close($curl);

		preg_match('`id=.main_content.*?>(.*?)id=.bottomd`s', $content, $text);
		preg_match('`class=.spagetitle.*?>(.*?)</span`s', $text[1], $pageTitle);
		preg_match('`class=.text-block.*?>(.*?)id=.items-folding`s', $text[1], $description);
		echo "$content";
		preg_match('`class=.ad-thumb-list.*?src="(.*?)".*?left`s', $content, $img);
//		$img = preg_replace('`./.*?/`', "", $img[1]);

		return array(
			'title'       => $pageTitle[1],
			'description' => $description[1],
			'image'       => $img[1],
		);


	}
	$img = getProductInfo("http://www.elgo.ua/produkciya/elgo/naruzhnoe_osveshhenie/osvetitelnaya_svetidiodnaya_sistema_adquen/ADQUEN_OU");
var_dump($img['image']);